home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2491 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Weird perl-C interaction (rand)
  5. Date: Sun, 21 Jan 96 20:14:41 GMT
  6. Organization: none
  7. Distribution: world
  8. Message-ID: <822255281snz@genesis.demon.co.uk>
  9. References: <4djfjg$l45@decaxp.harvard.edu> <4djt5i$fjn@reznor.larc.nasa.gov>
  10. Reply-To: fred@genesis.demon.co.uk
  11. X-NNTP-Posting-Host: genesis.demon.co.uk
  12. X-Newsreader: Demon Internet Simple News v1.27
  13. X-Mail2News-Path: genesis.demon.co.uk
  14.  
  15. In article <4djt5i$fjn@reznor.larc.nasa.gov>
  16.            hook@cscsun3.larc.nasa.gov "Ed Hook" writes:
  17.  
  18. >  It looks like you've uncovered a serious problem -- I modified 'frotz'
  19. >  so that it dumps out the first 10 values returned by 'random()', along
  20. >  with their reductions mod 32768. It appears that, regardless of the
  21. >  seed value, the reductions are always the *same* sequence; here are three
  22. >  examples:
  23. >
  24. >seed =   1184563200 :
  25.  
  26. ...
  27.  
  28. >seed =    434831360 :
  29.  
  30. ...
  31.  
  32. >seed =    987693056 :
  33.  
  34. >  Any other comments ?
  35.  
  36. Have you noticed that your seeds are all exact multiples of 65536? Even
  37. so your results do imply that the lower bits of the series are not affected
  38. by the higher bits which does cast doubts on AIX's claims.
  39.  
  40. -- 
  41. -----------------------------------------
  42. Lawrence Kirby | fred@genesis.demon.co.uk
  43. Wilts, England | 70734.126@compuserve.com
  44. -----------------------------------------
  45.